package com.github.qingcheng.service.impl;

import com.github.qingcheng.mapper.LoginMapper;
import com.github.qingcheng.pojo.Account;
import com.github.qingcheng.service.LoginService;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;

/**
 * @author GY
 * @version V1.0
 * @date 2025-01-21 11:41
 */
@Service
@RequiredArgsConstructor
public class LoginServiceImpl implements LoginService {
    private final LoginMapper loginMapper;

    @Override
    public String login(Account account) throws Exception {
        if (ObjectUtils.isEmpty(account)||
        account.getName().isEmpty()||
        account.getPassword().isEmpty()) {
            throw new Exception("参数错误");
        }
        // if ("songjiang".equals(account.getName())){
        //     String s = JwtUtils.generateJwt());
        // }

    return null;
    }
}
